#include<stdio.h>
#include<stdlib.h>
#include<time.h>
/**
qsort bsearch rand
*/
//[a,b]

int main()
{
    srand(time(NULL));
    int tot=0;;
    for(;;)
    {
        ++tot;
        int k=rand()%100+1;
        printf("%d ",k);
        if(k==50)
            break;
    }
    printf("\ntot=%d\n",tot);
    return 0;
}
